import service from '@/utils/request'

export const useSensitiveWordApi = (id: number) => {
    return service.get('/im/sensitive/word/' + id)
}

export const useSensitiveWordSubmitApi = (dataForm: any) => {
    if (dataForm.id) {
        return service.put('/im/sensitive/word', dataForm)
    } else {
        return service.post('/im/sensitive/word', dataForm)
    }
}

export const useSensitiveWordEnabledApi = (data: any) => {
    return service.put('/im/sensitive/word/enabled', data)
}